package com.hongxia.assetsys.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * 
 * @TableName tb_asset
 */
@TableName(value ="tb_asset")
@Data
public class Asset implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 资产编号
     */
    private String assetno;

    /**
     * 资产型号
     */
    private String assettypeno;

    /**
     * 资产名
     */
    private String assetname;

    /**
     * 资产标签
     */
    private String assetlabel;

    /**
     * 资产描述
     */
    private String assetdesc;

    /**
     * 资产类别
     */
    private String assetcategory;

    /**
     * 资产状态
     */
    private String assetstatus;

    /**
     * 加入时间
     */
    private Date registertime;

    /**
     * 最近更新时间
     */
    private Date lastupdatedtime;

    /**
     * 资产所属组织
     */
    private Integer belongorg;

    /**
     * 资产负责人
     */
    private String assetuser;

    /**
     * 资产网络ip
     */
    private String ip;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Asset other = (Asset) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAssetno() == null ? other.getAssetno() == null : this.getAssetno().equals(other.getAssetno()))
            && (this.getAssettypeno() == null ? other.getAssettypeno() == null : this.getAssettypeno().equals(other.getAssettypeno()))
            && (this.getAssetname() == null ? other.getAssetname() == null : this.getAssetname().equals(other.getAssetname()))
            && (this.getAssetlabel() == null ? other.getAssetlabel() == null : this.getAssetlabel().equals(other.getAssetlabel()))
            && (this.getAssetdesc() == null ? other.getAssetdesc() == null : this.getAssetdesc().equals(other.getAssetdesc()))
            && (this.getAssetcategory() == null ? other.getAssetcategory() == null : this.getAssetcategory().equals(other.getAssetcategory()))
            && (this.getAssetstatus() == null ? other.getAssetstatus() == null : this.getAssetstatus().equals(other.getAssetstatus()))
            && (this.getRegistertime() == null ? other.getRegistertime() == null : this.getRegistertime().equals(other.getRegistertime()))
            && (this.getLastupdatedtime() == null ? other.getLastupdatedtime() == null : this.getLastupdatedtime().equals(other.getLastupdatedtime()))
            && (this.getBelongorg() == null ? other.getBelongorg() == null : this.getBelongorg().equals(other.getBelongorg()))
            && (this.getAssetuser() == null ? other.getAssetuser() == null : this.getAssetuser().equals(other.getAssetuser()))
            && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAssetno() == null) ? 0 : getAssetno().hashCode());
        result = prime * result + ((getAssettypeno() == null) ? 0 : getAssettypeno().hashCode());
        result = prime * result + ((getAssetname() == null) ? 0 : getAssetname().hashCode());
        result = prime * result + ((getAssetlabel() == null) ? 0 : getAssetlabel().hashCode());
        result = prime * result + ((getAssetdesc() == null) ? 0 : getAssetdesc().hashCode());
        result = prime * result + ((getAssetcategory() == null) ? 0 : getAssetcategory().hashCode());
        result = prime * result + ((getAssetstatus() == null) ? 0 : getAssetstatus().hashCode());
        result = prime * result + ((getRegistertime() == null) ? 0 : getRegistertime().hashCode());
        result = prime * result + ((getLastupdatedtime() == null) ? 0 : getLastupdatedtime().hashCode());
        result = prime * result + ((getBelongorg() == null) ? 0 : getBelongorg().hashCode());
        result = prime * result + ((getAssetuser() == null) ? 0 : getAssetuser().hashCode());
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", assetno=").append(assetno);
        sb.append(", assettypeno=").append(assettypeno);
        sb.append(", assetname=").append(assetname);
        sb.append(", assetlabel=").append(assetlabel);
        sb.append(", assetdesc=").append(assetdesc);
        sb.append(", assetcategory=").append(assetcategory);
        sb.append(", assetstatus=").append(assetstatus);
        sb.append(", registertime=").append(registertime);
        sb.append(", lastupdatedtime=").append(lastupdatedtime);
        sb.append(", belongorg=").append(belongorg);
        sb.append(", assetuser=").append(assetuser);
        sb.append(", ip=").append(ip);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}